home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / amos / amsls496.lzh / AMOSLIST / 000148_amos-request@svcs1.digex.net_Tue Apr 30 02:14:41 1996.msg < prev    next >
Internet Message Format  |  1996-05-01  |  5KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id CAA21225;  for <mcox@access.digex.net> ; Tue, 30 Apr 1996 02:14:40 -0400
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id XAA20483 for amos-out; Mon, 29 Apr 1996 23:00:53 -0400
  3. Received: from mail1.access.digex.net (mail1-2.access.digex.net [204.91.197.3]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id XAA20480 for <amos-list@svcs1.digex.net>; Mon, 29 Apr 1996 23:00:52 -0400
  4. Received: from conan.eds-ms.com (conan.eds-ms.com [204.240.136.11]) by mail1.access.digex.net (8.6.12/8.6.12) with SMTP id XAA00675;  for <amos-list@access.digex.net> ; Mon, 29 Apr 1996 23:00:52 -0400
  5. Received: from relay-4.mail.demon.net by conan.eds-ms.com (5.x/SMI-SVR4)
  6.     id AA07249; Mon, 29 Apr 1996 23:00:51 -0400
  7. Received: from post.demon.co.uk ([158.152.1.72]) by relay-4.mail.demon.net
  8.           id ab25294; 30 Apr 96 2:57 GMT
  9. Received: from sneech.demon.co.uk ([158.152.239.175]) by relay-3.mail.demon.net
  10.           id aa15558; 30 Apr 96 3:09 +0100
  11. Received: by sneech.demon.co.uk (V1.16/Amiga)
  12.     id AA000dd; Tue, 30 Apr 96 01:38:50 GMT
  13. Date: Tue, 30 Apr 96 01:38:50 GMT
  14. Message-Id: <9604300138.AA000dc@sneech.demon.co.uk>
  15. Organization: None
  16. X-Mailviewer: Mail 1.15
  17. From: Paul Burkey <amos-list@sneech.demon.co.uk>
  18. To: amos-list@conan.eds-ms.com
  19. Subject: Re: Amos v Blitz getting silly
  20. Status: RO
  21. X-Status: 
  22.  
  23. joe hick and Giark asked :-
  24.  
  25. > Can you give me an example of how to eliminate screen flicker without 
  26. > using double buffer?  I'm working on a game with a few anims in a 
  27. > viewscreen and I can't get them to animate without flickering unless I 
  28. > use double buffer.  What technique do you use?
  29.  
  30. Unless your only using a few small objects then there's no way to get rid of
  31. flicker withoyt double buffer. Dubble buffer isn't just there becasue it's
  32. an easy option, it's there becasue there's no other way to do it.
  33.  
  34. Look at it like this... The screen is constantly being updated and drawn line
  35. by line. When the line gets to the bottom and starts again at the top it is
  36. known as the 'vbl' and you can time your program to run smoothly by waiting
  37. for this which I'm sure you already know about... The flicker comes in when
  38. you are pasting/drawing graphics to the screen while it's in the middle of
  39. updating. If you were to stick to the very bottom of the page and you only had
  40. a few small objects to draw then you could quickly paste these in place before
  41. that part of the screen gets updated which would give you no flicker but no
  42. matter what method you use there's no way you are going to be able to update
  43. more than a few items before the screen update catches you out!!...
  44.  
  45. If you take a look at the source code for my game Sneech you will notice that
  46. I don't use a double buffer in that but thats only becasue there's only a few
  47. tiny pieces being pasted on each frame. If I was using bigger objects I'd have
  48. to use double buffer.
  49.  
  50. The *only* bad thing about double buffer is the extra chip memory use....
  51.  
  52. One thing people don't realise and thats the fact that double buffering doesn't
  53. need to slow anything down, appart from some cases like scrolling where you need
  54. to scroll on both screens. If it's moving objects then you're just drawing
  55. your graphics on an 'out of view' screen and then you are switching that to the
  56. front just before the screen gets displayed. Okay so theres one command that
  57. switches the screens but this takes up such a small bit of time. You will just
  58. have to do all the screen switching and bob updating manualy and you'll soon
  59. be able to get it working just as fast as a non Double buffer screen.
  60.  
  61. Remember, when you use a double buffer and your main loop takes more than 50th
  62. of a second then it will look slow but it's not because of the double buffer,
  63. it's becasue your program and/or graphics display is too slow to keep up with
  64. the frame rate. If you miss that vbl you'll have to wait for the next one!!
  65.  
  66. And thats what makes game programing so much fun!!! :)
  67.  
  68. Cheers,
  69.  
  70. Paul
  71.  
  72.  
  73. ---
  74. ------------------------. Swear words are only effective if they are found
  75.  Paul Burkey 2:250/366.4 \ to be offensive. Regular use breeds a familiarity
  76.  IRC:- Shoecake           \ leading  to  ineffective  offensiveness  and
  77.  paulb@sneech.demon.co.uk  \ therefore subsequent obsolescence of the swear
  78.  Proud member of Team AMIGA \ word. With present day usage, all swear words
  79. -----------------------------' should be obsolete within twelve months....